﻿using System.Windows;
using System.Threading;
using System.Globalization;
using System.Windows.Controls;

namespace Demo
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void openAnnotationsButton_Click(object sender, RoutedEventArgs e)
        {
            var win = new UIAnnotationsWindow();
            win.Owner = this;
            win.ShowDialog();
        }

        private void openGenericAdornerButton_Click(object sender, RoutedEventArgs e)
        {
            var win = new GenericDemoWindow();
            win.Owner = this;
            win.ShowDialog();
        }

        private void openBehaviorsButton_Click(object sender, RoutedEventArgs e)
        {
            var win = new BehaviorsDemoWindow();
            win.Owner = this;
            win.ShowDialog();
        }
        private void OnLanguageSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            if (((ComboBox)sender).SelectedIndex == 0)
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            else
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");

        }
    }
}
